/*
 * 结算管理请求
 * 240716
 *
 */

import { http } from "@/utils/http";
import { baseUrlApi } from "@/store/utils";

// 获取项目对账列表
export const getReconciliationDataList = (params?: object) => {
  return http.request("get", baseUrlApi("reconciliation/list"), { params });
};

// 获取验收清单列表
export const getSosupplyDataList = (params?: object) => {
  return http.request("get", baseUrlApi("sosupply/list"), { params });
};

// 新增/编辑 项目对账单
export const saveReconciliationData = (data?: object) => {
  return http.request("post", baseUrlApi("reconciliation/save"), { data });
};

// 项目对账提交审批
export const reconSubmitAudit = (data?: object) => {
  return http.request("post", baseUrlApi("reconciliation/submit/approval"), {
    data
  });
};

// 项目对账审批
export const reconciliationApproval = (data?: object) => {
  return http.request("post", baseUrlApi("reconciliation/approval"), { data });
};

// 项目对账列表删除
export const delReconciliationData = (data?: object) => {
  return http.request("post", baseUrlApi("reconciliation/delete"), { data });
};

// 获取项目对账详情信息
export const getReconciliationDataInfo = (params?: object) => {
  return http.request("get", baseUrlApi("reconciliation/info"), { params });
};

// 获取项目对账绑定的验收清单列表
export const getReconciliationSosupplyDataList = (params?: object) => {
  return http.request("get", baseUrlApi("reconciliation/order/list"), {
    params
  });
};

// 获取项目对账绑定的对账材料列表
export const getReconciliationMaterialDataList = (params?: object) => {
  return http.request("get", baseUrlApi("reconciliation/material/list"), {
    params
  });
};

// 获取项目对账绑定的对账材料列表表尾数据
export const getReconciliationMaterialDataListFooter = (params?: object) => {
  return http.request("get", baseUrlApi("reconciliation/material/count"), {
    params
  });
};

// 根据idList获取验收清单材料列表
export const getSosupplyMaterialDataList = (params?: object) => {
  return http.request(
    "get",
    baseUrlApi("reconciliation/SoSupplymaterial/list"),
    { params }
  );
};

// 获取核对/对账表格数据
export const getConfirmHistoryList = (params?: object) => {
  return http.request("get", baseUrlApi("audit/confirm/history/list"), {
    params
  });
};

// 项目对账 - 核对
export const reconciliationCheck = (data?: object) => {
  return http.request("post", baseUrlApi("reconciliation/check"), { data });
};

// 项目对账 - 对账确认
export const reconciliationConfirm = (data?: object) => {
  return http.request("post", baseUrlApi("reconciliation/confirm"), { data });
};

// 项目对账 - 云采确认
export const reconciliationYcConfirm = (data?: object) => {
  return http.request("post", baseUrlApi("reconciliation/ycconfirm"), {
    data
  });
};

// 获取项目结算列表
export const getSettlementDataList = (params?: object) => {
  return http.request("get", baseUrlApi("projectSettlement/list"), { params });
};

// 项目结算提交审批
export const stlmtSubmitAudit = (data?: object) => {
  return http.request("post", baseUrlApi("projectSettlement/submit/approval"), {
    data
  });
};

// 项目结算审批
export const reconciliationSettlementApproval = (data?: object) => {
  return http.request("post", baseUrlApi("projectSettlement/approval"), {
    data
  });
};

// 项目结算列表删除
export const delSettlementData = (data?: object) => {
  return http.request("post", baseUrlApi("projectSettlement/deleted"), {
    data
  });
};

// 获取对账单绑定的材料列表
export const getRecoMaterialDataList = (params?: object) => {
  return http.request(
    "get",
    baseUrlApi("projectSettlement/reconciliationmaterial/list"),
    {
      params
    }
  );
};

// 新增/编辑 项目结算单
export const saveSettlementData = (data?: object) => {
  return http.request("post", baseUrlApi("projectSettlement/save"), { data });
};

// 项目结算 - 核对
export const settlementCheck = (data?: object) => {
  return http.request("post", baseUrlApi("projectSettlement/check"), { data });
};

// 项目结算 - 结算确认
export const settlementConfirm = (data?: object) => {
  return http.request("post", baseUrlApi("projectSettlement/confirm"), {
    data
  });
};

// 项目结算 - 云采确认
export const settlementYcConfirm = (data?: object) => {
  return http.request("post", baseUrlApi("projectSettlement/yc/confirm"), {
    data
  });
};

// 获取项目结算详情信息
export const getSettlementDataInfo = (params?: object) => {
  return http.request("get", baseUrlApi("projectSettlement/info"), {
    params
  });
};

// 获取项目结算绑定的结算材料列表
export const getSettlementMaterialDataList = (params?: object) => {
  return http.request("get", baseUrlApi("projectSettlement/material/list"), {
    params
  });
};

// 获取项目结算绑定的结算材料列表Footer数据
export const getSettlementMaterialDataListFooter = (params?: object) => {
  return http.request("get", baseUrlApi("projectSettlement/material/count"), {
    params
  });
};

// 获取项目结算绑定的对账订单列表
export const getSettlementRecoDataList = (params?: object) => {
  return http.request("get", baseUrlApi("projectSettlement/order/list"), {
    params
  });
};

// 获取供应商对账列表
export const getSupplierRecoDataList = (params?: object) => {
  return http.request("get", baseUrlApi("spreconciliation/list"), {
    params
  });
};

// 供应商对账列表删除
export const delSupplierRecoData = (data?: object) => {
  return http.request("post", baseUrlApi("spreconciliation/delete"), { data });
};

// 供应商对账提交审批
export const sprecoSubmitAudit = (data?: object) => {
  return http.request("post", baseUrlApi("spreconciliation/submit/approval"), {
    data
  });
};

// 供应商对账审批
export const spreconciliationApproval = (data?: object) => {
  return http.request("post", baseUrlApi("spreconciliation/approval"), {
    data
  });
};

// 获取供应商结算列表
export const getSupplierSettlementDataList = (params?: object) => {
  return http.request("get", baseUrlApi("supplierSettlement/list"), {
    params
  });
};

// 供应商结算列表删除
export const delSupplierSettlementData = (data?: object) => {
  return http.request("post", baseUrlApi("supplierSettlement/deleted"), {
    data
  });
};

// 供应商结算提交审批
export const spstlmtSubmitAudit = (data?: object) => {
  return http.request(
    "post",
    baseUrlApi("supplierSettlement/submit/approval"),
    {
      data
    }
  );
};

// 供应商结算审批
export const spreconciliationSettlementApproval = (data?: object) => {
  return http.request("post", baseUrlApi("supplierSettlement/approval"), {
    data
  });
};

// 获取供货清单绑定的材料列表
export const getSupplierRecoMaterialDataList = (params?: object) => {
  return http.request(
    "get",
    baseUrlApi("spreconciliation/PoSupplymaterial/list"),
    {
      params
    }
  );
};

// 新增/编辑 供应商对账单
export const saveSupplierRecoData = (data?: object) => {
  return http.request("post", baseUrlApi("spreconciliation/save"), { data });
};

// 供应商对账 - 核对
export const spReconciliationCheck = (data?: object) => {
  return http.request("post", baseUrlApi("spreconciliation/check"), { data });
};

// 供应商对账 - 对账确认
export const spReconciliationConfirm = (data?: object) => {
  return http.request("post", baseUrlApi("spreconciliation/confirm"), { data });
};

// 供应商对账 - 云采确认
export const spReconciliationYcConfirm = (data?: object) => {
  return http.request("post", baseUrlApi("spreconciliation/ycconfirm"), {
    data
  });
};

// 获取供应商对账单详情
export const getSupplierRecoDataInfo = (params?: object) => {
  return http.request("get", baseUrlApi("spreconciliation/info"), {
    params
  });
};

// 获取供应商对账单绑定的供货清单
export const getReconciliationPosupplyDataList = (params?: object) => {
  return http.request("get", baseUrlApi("spreconciliation/order/list"), {
    params
  });
};

// 获取供应商对账单绑定的材料列表
export const getSupReconciliationMaterialDataList = (params?: object) => {
  return http.request("get", baseUrlApi("spreconciliation/material/list"), {
    params
  });
};

// 获取供应商对账单绑定的材料列表Footer数据
export const getSupReconciliationMaterialDataListFooter = (params?: object) => {
  return http.request("get", baseUrlApi("spreconciliation/material/count"), {
    params
  });
};

// 获取供应商对账单绑定的材料列表
export const getSupRecoMaterialDataList = (params?: object) => {
  return http.request(
    "get",
    baseUrlApi("supplierSettlement/spreconciliationmaterial/list"),
    {
      params
    }
  );
};

// 新增/编辑 供应商结算单
export const saveSupplierSettlementData = (data?: object) => {
  return http.request("post", baseUrlApi("supplierSettlement/save"), {
    data
  });
};

// 供应商结算 - 核对
export const spSettlementCheck = (data?: object) => {
  return http.request("post", baseUrlApi("supplierSettlement/check"), {
    data
  });
};

// 供应商结算 - 结算确认
export const spSettlementConfirm = (data?: object) => {
  return http.request("post", baseUrlApi("supplierSettlement/confirm"), {
    data
  });
};

// 供应商结算 - 云采确认
export const spSettlementYcConfirm = (data?: object) => {
  return http.request("post", baseUrlApi("supplierSettlement/yc/confirm"), {
    data
  });
};

// 获取供应商结算单详情
export const getSupplierSettlementDataInfo = (params?: object) => {
  return http.request("get", baseUrlApi("supplierSettlement/info"), {
    params
  });
};

// 获取供应商结算单绑定的对账单
export const getSupSettlementRecoDataList = (params?: object) => {
  return http.request("get", baseUrlApi("supplierSettlement/order/list"), {
    params
  });
};

// 获取供应商结算单绑定的材料列表
export const getSupSettlementMaterialDataList = (params?: object) => {
  return http.request("get", baseUrlApi("supplierSettlement/material/list"), {
    params
  });
};

// 获取供应商结算单绑定的材料列表Footer数据
export const getSupSettlementMaterialDataListFooter = (params?: object) => {
  return http.request("get", baseUrlApi("supplierSettlement/material/count"), {
    params
  });
};

// 获取对账获取历史对账含税总额
export const getReconciliationgetTaxTotalPrice = (data?: object) => {
  return http.request("post", baseUrlApi("reconciliation/getTaxTotalPrice"), {
    data
  });
};

// 获取结算获取历史结算含税总额
export const getProjectSettlementgetSupplyTaxTotalPrice = (data?: object) => {
  return http.request(
    "post",
    baseUrlApi("projectSettlement/getSupplyTaxTotalPrice"),
    {
      data
    }
  );
};

// 获取供应商对账获取历史对账含税总额
export const getSupplySettlementSum = (params?: object) => {
  return http.request(
    "get",
    baseUrlApi("spreconciliation/getSupplySettlementSum"),
    {
      params
    }
  );
};

// 获取供应商结算获取历史结算含税总额
export const getSupplyTaxTotalPrice = (params?: object) => {
  return http.request(
    "get",
    baseUrlApi("supplierSettlement/getSupplyTaxTotalPrice"),
    {
      params
    }
  );
};
